#!/usr/bin/python

L=5

count1 = count2 = 0
for l in xrange(2,L+1):
    for s in xrange(l-2,-1,-1):
        for t in xrange(s+1,l):
            print s, t, l
            count1 += 1
print
for l in xrange(2,L+1):
    for s in xrange(0,l-1):
        for t in xrange(s+1,l):
            print s, t, l
            count2 += 1
print count1, count2
